<!--
 * @Author: your name
 * @Date: 2021-08-18 15:27:49
 * @LastEditTime: 2021-08-23 14:17:10
 * @LastEditors: Please set LastEditors
 * @Description: In User Settings Edit
 * @FilePath: /仓库/picture.html
-->
<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>垂直居中图片</title>
  <style>
    .pic {
      width: 300px;
      height: 300px;
      background-color: aqua;
      text-align: center;
      /* line-height: 500px; */
      display: table-cell;
      vertical-align: middle;
      margin: 20px;
    }

    .wp {
      width: 300px;
      height: 300px;
      background-color: beige;
      margin: 10px;
    }

    img {
      width: 200px;
      height: 100px;
    }
  </style>
</head>

<body>
  <div class="pic">
    <img src="./wyyx/img/bg_2.png" alt="">
  </div>
  <div class="wp"></div>
</body>

</html>